package com.bsj.power.pls.service;

import com.bsj.power.common.config.global.JsonResult;
import com.bsj.power.common.def.dto.tree.TreeDTO;
import com.bsj.power.common.def.vo.tree.TreeStructureVO;
import com.bsj.power.common.def.vo.tree.TreeVO;

import java.util.List;

/**
 * @author LiJiaXin
 * @version 1.0.0
 * @description TreeService
 * @time 2024/10/9 11:50
 */
public interface TreeService {

    /**
     * 添加
     *
     * @param treeDTO
     * @return com.bsj.power.common.config.global.JsonResult
     * @author ljx
     * @time 2024/10/9 14:02
     */
    JsonResult addTree(TreeDTO treeDTO);

    /**
     * 删除
     *
     * @param treeId
     * @return com.bsj.power.common.config.global.JsonResult
     * @author ljx
     * @time 2024/10/9 14:02
     */
    JsonResult deleteTree(Integer treeId);

    /**
     * 修改
     *
     * @param treeDTO
     * @return com.bsj.power.common.config.global.JsonResult
     * @author ljx
     * @time 2024/10/9 14:02
     */
    JsonResult updateTree(TreeDTO treeDTO);

    /**
     * 获取单个
     *
     * @param treeId
     * @return com.bsj.power.common.def.vo.tree.TreeVO
     * @author ljx
     * @time 2024/10/9 14:02
     */
    TreeVO getTreeById(Integer treeId);

    /**
     * 树结构
     *
     * @return java.util.List<com.bsj.power.common.def.vo.tree.TreeStructureVO>
     * @author ljx
     * @time 2024/10/9 14:02
     */
    List<TreeStructureVO> getTreeStructure();

    /**
     * 获取当前目录的所有下级或上级目录id（包括本身）
     *
     * @param treeId
     * @param type   1:上级 2:下级
     * @return java.util.List<java.lang.Integer>
     * @author ljx
     * @time 2024/10/14 10:58
     */
    List<Integer> getTreeIds(Integer treeId, Integer type);
}
